#include "gm_handle.h"

ULONG gm_handle::s_nextHandle = 0x3000;

gm_handle::gm_handle(void)
{
	_type = UNKNOWN_HANDLE;
	_handle = 0;
	_param = 0;
}

gm_handle::~gm_handle(void)
{
}

void gm_handle::init_handle(HANDLE_TYPE type)
{
	_type = type;
	_handle = generate_handle();
}

HANDLE_TYPE gm_handle::get_handle_type()
{
	return _type;
}

HANDLE gm_handle::get_handle()
{
	return _handle;
}

HANDLE gm_handle::generate_handle()
{
	return (HANDLE)s_nextHandle++;
}